package com.botarena.client;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;

public class UIHelper {
	
	public static final int MAX_NAME_LEN = 18;
	public static final int MAX_NAME_LEN_BIG = 30;
	public static final int TOP_N = 5;
	
	public static Panel createSmallLoader(String text) {
		return createLoader("/images/loader_small.gif", text);
	}
	
	public static Panel createBigLoader(String text) {
		return createLoader("/images/loader_big.gif", text);
	}
	
	public static Panel createLoader(String url, String info) {
		HorizontalPanel panel = new HorizontalPanel();
		panel.add(new Image(url));
		if (info != null) 
			panel.add(new Label(info));
		return panel;
	}

}
